# -*- coding: utf-8 -*-
import numpy as np

##################################################################
# 数据目录位置
DATA_DIR = './data_zimu_fenjie/'
# 数据文件名
GESTURES = ["zuoxie", "youxie", "hen", "shu", "(", ")", "idle",]
GESTURES_ICON = ["/", "\\", "-", "|", "(", ")", "_"]
# 数据文件类别，onehot编码，1值位置表示类别
GESTURES_TO_Y = {
    'zuoxie':	[1,0,0,0,0,0,0], 
    'youxie':	[0,1,0,0,0,0,0], 
    'hen'   :	[0,0,1,0,0,0,0], 
    'shu'   :	[0,0,0,1,0,0,0], 
    '('		:	[0,0,0,0,1,0,0], 
    ')'		:	[0,0,0,0,0,1,0], 
    'idle'	:	[0,0,0,0,0,0,1]}
# 一个sample数据形状
T = 10
V = 6
TYPE_NUM = 7
AUG_STEPS = 5
# 数据文件类别
FILE_TYPE = '.csv'
# 数据类别，list， np.array
READ_DATA_TYPE_TO_IONDEX = {1:type(np.array([])), 2:type(np.array([]))}
READ_DATA_ARRAY_TYPE = 1
READ_DATA_LIST_TYPE = 2
##################################################################
# echonet 参数
N_INTERNAL_UNITS = 50
SPECTRAL_RADIUS = 0.59
LEAK = 0.6
CONNECTIVITY = 0.25
INPUT_SCALING = 0.1
NOISE_LEVEL = 0.01
CIRCLE = False
##################################################################
# 现有模型参数文件
PATH_TO_DIR = './model-2023-07-13-(0.026-0.991-1.190-0.789)/'
PATH_TO_MLP_MODEL = PATH_TO_DIR + 'model.h5'
PATH_TO_ECHO_MODEL = PATH_TO_DIR + 'echo.json'
# 输出CPP常量的位置
CPP_CONST_DIR = './cpp_const_file/'
##################################################################
# MLP model 参数
INPUT_SHAPE = (T/AUG_STEPS, N_INTERNAL_UNITS)
BATCH_SIZE = 32
EPOCHS = 100
LAYERS_1_NUM = 64
LAYERS_1_ACT = 'relu'
LAYERS_2_NUM = 64
LAYERS_2_ACT = 'relu'
LAYERS_OUTPUT_NUM = TYPE_NUM
LAYERS_OUTPUT_ACT = 'softmax'
MODEL_COMPLIE_ARGS = {'optimizer':'adam','loss':'sparse_categorical_crossentropy','metrics':['accuracy']}
# MLP 自定义
USE_MLP_DIY = True
MLP_LAYER_DIY = [
    ('Flatten', {'input_shape':(T, N_INTERNAL_UNITS)}),
    ('Dense', (32, 'relu')),
    ('Dense', (16, 'relu')),
    ('Dense', (7, 'softmax')),
    ]